public class Offer10 {
    public static void main(String[] args) {
        System.out.println(jump(2));
    }
    public static int jump(int n){
        int one = 1;
        int two = 2;
        if (n<2){
            return n==0?0:1;
        }
        int result=0;
        for (int i = 2; i <=n ; i++) {
            result=one+two;
            one=two;
            two=result;
        }
        return result;
    }
}
